package tech.aistar.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import org.springframework.web.bind.annotation.RequestMapping;

import tech.aistar.entity.Completion;
import tech.aistar.entity.ParperBank;
import tech.aistar.service.ICompletionService;
import tech.aistar.service.TestPaperService;


import javax.servlet.http.HttpSession;
import java.util.List;

@Service
@RequestMapping("/Ware")
public class QuestionwareAction {
    @Autowired
    private ICompletionService completion;

    @Autowired
    private TestPaperService testPaperService;
    @RequestMapping("/bank")
    public String load(HttpSession session){
        List<ParperBank> list = testPaperService.findAll();
        List<Integer> id = testPaperService.findParperId();
        session.setAttribute("list",list);
        session.setAttribute("id",id);
        return "questionbank";
    }

//    @RequestMapping("/ComWareAction")
//    public String CompletionWare(HttpSession session){
//        List<Completion> com = completion.findAll();
//        System.out.println(com);
//        session.setAttribute("com",com);
//        return "comware";
//    }
//    @RequestMapping("/Testpaper")
//    public String TestLanguage(HttpSession session){
//
//        return "questionbank";
//    }

//    @RequestMapping("/TestpaperDiff")
//    public String TestDiff(HttpSession session){
//        List<String> diff = testPaperService.finddiff();
//        session.setAttribute("diff",diff);
//        return "questionbank";
//    }
//
//    @RequestMapping("/TestpaperPaper")
//    public String TestPaper(HttpSession session){
//        List<String> name = testPaperService.findPaper();
//        System.out.println(name);
//        session.setAttribute("name",name);
//        return "questionbank";
//    }


}
